<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>BATBlock (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="BATBlock (POI API Documentation)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BATBlock.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>PREV CLASS</li>
<li><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.BATBlockAndIndex.html" title="class in org.apache.poi.poifs.storage"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/poifs/storage/BATBlock.html" target="_top">FRAMES</a></li>
<li><a href="BATBlock.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li><a href="#nested_class_summary">NESTED</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li><a href="#field_detail">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<p class="subTitle">org.apache.poi.poifs.storage</p>
<h2 title="Class BATBlock" class="title">Class BATBlock</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.poi.poifs.storage.BATBlock</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../org/apache/poi/poifs/storage/BlockWritable.html" title="interface in org.apache.poi.poifs.storage">BlockWritable</a></dd>
</dl>
<hr>
<br>
<pre>public final class <strong>BATBlock</strong>
extends java.lang.Object</pre>
<div class="block">A block of block allocation table entries. BATBlocks are created
 only through a static factory method: createBATBlocks.</div>
<dl><dt><span class="strong">Author:</span></dt>
  <dd>Marc Johnson (mjohnson at apache dot org)</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.BATBlockAndIndex.html" title="class in org.apache.poi.poifs.storage">BATBlock.BATBlockAndIndex</a></strong></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#bigBlockSize">bigBlockSize</a></strong></code>
<div class="block">Either 512 bytes (<a href="../../../../../org/apache/poi/poifs/common/POIFSConstants.html#SMALLER_BIG_BLOCK_SIZE"><code>POIFSConstants.SMALLER_BIG_BLOCK_SIZE</code></a>) 
  or 4096 bytes (<a href="../../../../../org/apache/poi/poifs/common/POIFSConstants.html#LARGER_BIG_BLOCK_SIZE"><code>POIFSConstants.LARGER_BIG_BLOCK_SIZE</code></a>)</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#calculateMaximumSize(org.apache.poi.poifs.storage.HeaderBlock)">calculateMaximumSize</a></strong>(<a href="../../../../../org/apache/poi/poifs/storage/HeaderBlock.html" title="class in org.apache.poi.poifs.storage">HeaderBlock</a>&nbsp;header)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#calculateMaximumSize(org.apache.poi.poifs.common.POIFSBigBlockSize, int)">calculateMaximumSize</a></strong>(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                    int&nbsp;numBATs)</code>
<div class="block">Calculates the maximum size of a file which is addressable given the
  number of FAT (BAT) sectors specified.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#calculateStorageRequirements(org.apache.poi.poifs.common.POIFSBigBlockSize, int)">calculateStorageRequirements</a></strong>(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                            int&nbsp;entryCount)</code>
<div class="block">Calculate how many BATBlocks are needed to hold a specified
 number of BAT entries.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#calculateXBATStorageRequirements(org.apache.poi.poifs.common.POIFSBigBlockSize, int)">calculateXBATStorageRequirements</a></strong>(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                                int&nbsp;entryCount)</code>
<div class="block">Calculate how many XBATBlocks are needed to hold a specified
 number of BAT entries.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#createBATBlock(org.apache.poi.poifs.common.POIFSBigBlockSize, java.nio.ByteBuffer)">createBATBlock</a></strong>(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
              java.nio.ByteBuffer&nbsp;data)</code>
<div class="block">Create a single BATBlock from the byte buffer, which must hold at least
  one big block of data to be read.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#createBATBlocks(org.apache.poi.poifs.common.POIFSBigBlockSize, int[])">createBATBlocks</a></strong>(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
               int[]&nbsp;entries)</code>
<div class="block">Create an array of BATBlocks from an array of int block
 allocation table entries</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#createEmptyBATBlock(org.apache.poi.poifs.common.POIFSBigBlockSize, boolean)">createEmptyBATBlock</a></strong>(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                   boolean&nbsp;isXBAT)</code>
<div class="block">Creates a single BATBlock, with all the values set to empty.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#createXBATBlocks(org.apache.poi.poifs.common.POIFSBigBlockSize, int[], int)">createXBATBlocks</a></strong>(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                int[]&nbsp;entries,
                int&nbsp;startBlock)</code>
<div class="block">Create an array of XBATBlocks from an array of int block
 allocation table entries</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#doWriteData(java.io.OutputStream, byte[])">doWriteData</a></strong>(java.io.OutputStream&nbsp;stream,
           byte[]&nbsp;data)</code>
<div class="block">Default implementation of write for extending classes that
 contain their data in a simple array of bytes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/poifs/storage/BATBlock.BATBlockAndIndex.html" title="class in org.apache.poi.poifs.storage">BATBlock.BATBlockAndIndex</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#getBATBlockAndIndex(int, org.apache.poi.poifs.storage.HeaderBlock, java.util.List)">getBATBlockAndIndex</a></strong>(int&nbsp;offset,
                   <a href="../../../../../org/apache/poi/poifs/storage/HeaderBlock.html" title="class in org.apache.poi.poifs.storage">HeaderBlock</a>&nbsp;header,
                   java.util.List&lt;<a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a>&gt;&nbsp;bats)</code>
<div class="block">Returns the BATBlock that handles the specified offset,
  and the relative index within it.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#getOurBlockIndex()">getOurBlockIndex</a></strong>()</code>
<div class="block">Retrieve where in the file we live</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/poifs/storage/BATBlock.BATBlockAndIndex.html" title="class in org.apache.poi.poifs.storage">BATBlock.BATBlockAndIndex</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#getSBATBlockAndIndex(int, org.apache.poi.poifs.storage.HeaderBlock, java.util.List)">getSBATBlockAndIndex</a></strong>(int&nbsp;offset,
                    <a href="../../../../../org/apache/poi/poifs/storage/HeaderBlock.html" title="class in org.apache.poi.poifs.storage">HeaderBlock</a>&nbsp;header,
                    java.util.List&lt;<a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a>&gt;&nbsp;sbats)</code>
<div class="block">Returns the BATBlock that handles the specified offset,
  and the relative index within it, for the mini stream.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#getValueAt(int)">getValueAt</a></strong>(int&nbsp;relativeOffset)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#hasFreeSectors()">hasFreeSectors</a></strong>()</code>
<div class="block">Does this BATBlock have any free sectors in it, or
  is it full?</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#setOurBlockIndex(int)">setOurBlockIndex</a></strong>(int&nbsp;index)</code>
<div class="block">Record where in the file we live</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#setValueAt(int, int)">setValueAt</a></strong>(int&nbsp;relativeOffset,
          int&nbsp;value)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html#writeBlocks(java.io.OutputStream)">writeBlocks</a></strong>(java.io.OutputStream&nbsp;stream)</code>
<div class="block">Write the storage to an OutputStream</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="bigBlockSize">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>bigBlockSize</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a> bigBlockSize</pre>
<div class="block">Either 512 bytes (<a href="../../../../../org/apache/poi/poifs/common/POIFSConstants.html#SMALLER_BIG_BLOCK_SIZE"><code>POIFSConstants.SMALLER_BIG_BLOCK_SIZE</code></a>) 
  or 4096 bytes (<a href="../../../../../org/apache/poi/poifs/common/POIFSConstants.html#LARGER_BIG_BLOCK_SIZE"><code>POIFSConstants.LARGER_BIG_BLOCK_SIZE</code></a>)</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="createBATBlock(org.apache.poi.poifs.common.POIFSBigBlockSize, java.nio.ByteBuffer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createBATBlock</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a>&nbsp;createBATBlock(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                      java.nio.ByteBuffer&nbsp;data)</pre>
<div class="block">Create a single BATBlock from the byte buffer, which must hold at least
  one big block of data to be read.</div>
</li>
</ul>
<a name="createEmptyBATBlock(org.apache.poi.poifs.common.POIFSBigBlockSize, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createEmptyBATBlock</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a>&nbsp;createEmptyBATBlock(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                           boolean&nbsp;isXBAT)</pre>
<div class="block">Creates a single BATBlock, with all the values set to empty.</div>
</li>
</ul>
<a name="createBATBlocks(org.apache.poi.poifs.common.POIFSBigBlockSize, int[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createBATBlocks</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a>[]&nbsp;createBATBlocks(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                         int[]&nbsp;entries)</pre>
<div class="block">Create an array of BATBlocks from an array of int block
 allocation table entries</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entries</code> - the array of int entries</dd>
<dt><span class="strong">Returns:</span></dt><dd>the newly created array of BATBlocks</dd></dl>
</li>
</ul>
<a name="createXBATBlocks(org.apache.poi.poifs.common.POIFSBigBlockSize, int[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createXBATBlocks</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a>[]&nbsp;createXBATBlocks(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                          int[]&nbsp;entries,
                          int&nbsp;startBlock)</pre>
<div class="block">Create an array of XBATBlocks from an array of int block
 allocation table entries</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entries</code> - the array of int entries</dd><dd><code>startBlock</code> - the start block of the array of XBAT blocks</dd>
<dt><span class="strong">Returns:</span></dt><dd>the newly created array of BATBlocks</dd></dl>
</li>
</ul>
<a name="calculateStorageRequirements(org.apache.poi.poifs.common.POIFSBigBlockSize, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calculateStorageRequirements</h4>
<pre>public static&nbsp;int&nbsp;calculateStorageRequirements(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                               int&nbsp;entryCount)</pre>
<div class="block">Calculate how many BATBlocks are needed to hold a specified
 number of BAT entries.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entryCount</code> - the number of entries</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of BATBlocks needed</dd></dl>
</li>
</ul>
<a name="calculateXBATStorageRequirements(org.apache.poi.poifs.common.POIFSBigBlockSize, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calculateXBATStorageRequirements</h4>
<pre>public static&nbsp;int&nbsp;calculateXBATStorageRequirements(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                                   int&nbsp;entryCount)</pre>
<div class="block">Calculate how many XBATBlocks are needed to hold a specified
 number of BAT entries.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entryCount</code> - the number of entries</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of XBATBlocks needed</dd></dl>
</li>
</ul>
<a name="calculateMaximumSize(org.apache.poi.poifs.common.POIFSBigBlockSize, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calculateMaximumSize</h4>
<pre>public static&nbsp;long&nbsp;calculateMaximumSize(<a href="../../../../../org/apache/poi/poifs/common/POIFSBigBlockSize.html" title="class in org.apache.poi.poifs.common">POIFSBigBlockSize</a>&nbsp;bigBlockSize,
                        int&nbsp;numBATs)</pre>
<div class="block">Calculates the maximum size of a file which is addressable given the
  number of FAT (BAT) sectors specified. (We don't care if those BAT
  blocks come from the 109 in the header, or from header + XBATS, it
  won't affect the calculation)
  
 The actual file size will be between [size of fatCount-1 blocks] and
   [size of fatCount blocks].
  For 512 byte block sizes, this means we may over-estimate by up to 65kb.
  For 4096 byte block sizes, this means we may over-estimate by up to 4mb</div>
</li>
</ul>
<a name="calculateMaximumSize(org.apache.poi.poifs.storage.HeaderBlock)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calculateMaximumSize</h4>
<pre>public static&nbsp;long&nbsp;calculateMaximumSize(<a href="../../../../../org/apache/poi/poifs/storage/HeaderBlock.html" title="class in org.apache.poi.poifs.storage">HeaderBlock</a>&nbsp;header)</pre>
</li>
</ul>
<a name="getBATBlockAndIndex(int, org.apache.poi.poifs.storage.HeaderBlock, java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBATBlockAndIndex</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/poifs/storage/BATBlock.BATBlockAndIndex.html" title="class in org.apache.poi.poifs.storage">BATBlock.BATBlockAndIndex</a>&nbsp;getBATBlockAndIndex(int&nbsp;offset,
                                            <a href="../../../../../org/apache/poi/poifs/storage/HeaderBlock.html" title="class in org.apache.poi.poifs.storage">HeaderBlock</a>&nbsp;header,
                                            java.util.List&lt;<a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a>&gt;&nbsp;bats)</pre>
<div class="block">Returns the BATBlock that handles the specified offset,
  and the relative index within it.
 The List of BATBlocks must be in sequential order</div>
</li>
</ul>
<a name="getSBATBlockAndIndex(int, org.apache.poi.poifs.storage.HeaderBlock, java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSBATBlockAndIndex</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/poifs/storage/BATBlock.BATBlockAndIndex.html" title="class in org.apache.poi.poifs.storage">BATBlock.BATBlockAndIndex</a>&nbsp;getSBATBlockAndIndex(int&nbsp;offset,
                                             <a href="../../../../../org/apache/poi/poifs/storage/HeaderBlock.html" title="class in org.apache.poi.poifs.storage">HeaderBlock</a>&nbsp;header,
                                             java.util.List&lt;<a href="../../../../../org/apache/poi/poifs/storage/BATBlock.html" title="class in org.apache.poi.poifs.storage">BATBlock</a>&gt;&nbsp;sbats)</pre>
<div class="block">Returns the BATBlock that handles the specified offset,
  and the relative index within it, for the mini stream.
 The List of BATBlocks must be in sequential order</div>
</li>
</ul>
<a name="hasFreeSectors()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasFreeSectors</h4>
<pre>public&nbsp;boolean&nbsp;hasFreeSectors()</pre>
<div class="block">Does this BATBlock have any free sectors in it, or
  is it full?</div>
</li>
</ul>
<a name="getValueAt(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValueAt</h4>
<pre>public&nbsp;int&nbsp;getValueAt(int&nbsp;relativeOffset)</pre>
</li>
</ul>
<a name="setValueAt(int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setValueAt</h4>
<pre>public&nbsp;void&nbsp;setValueAt(int&nbsp;relativeOffset,
              int&nbsp;value)</pre>
</li>
</ul>
<a name="setOurBlockIndex(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOurBlockIndex</h4>
<pre>public&nbsp;void&nbsp;setOurBlockIndex(int&nbsp;index)</pre>
<div class="block">Record where in the file we live</div>
</li>
</ul>
<a name="getOurBlockIndex()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOurBlockIndex</h4>
<pre>public&nbsp;int&nbsp;getOurBlockIndex()</pre>
<div class="block">Retrieve where in the file we live</div>
</li>
</ul>
<a name="doWriteData(java.io.OutputStream, byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doWriteData</h4>
<pre>protected&nbsp;void&nbsp;doWriteData(java.io.OutputStream&nbsp;stream,
               byte[]&nbsp;data)
                    throws java.io.IOException</pre>
<div class="block">Default implementation of write for extending classes that
 contain their data in a simple array of bytes.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stream</code> - the OutputStream to which the data should be
               written.</dd><dd><code>data</code> - the byte array of to be written.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on problems writing to the specified
            stream.</dd></dl>
</li>
</ul>
<a name="writeBlocks(java.io.OutputStream)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>writeBlocks</h4>
<pre>public&nbsp;void&nbsp;writeBlocks(java.io.OutputStream&nbsp;stream)
                 throws java.io.IOException</pre>
<div class="block">Write the storage to an OutputStream</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/poifs/storage/BlockWritable.html#writeBlocks(java.io.OutputStream)">writeBlocks</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/poifs/storage/BlockWritable.html" title="interface in org.apache.poi.poifs.storage">BlockWritable</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>stream</code> - the OutputStream to which the stored data should
               be written</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on problems writing to the specified
            stream</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BATBlock.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>PREV CLASS</li>
<li><a href="../../../../../org/apache/poi/poifs/storage/BATBlock.BATBlockAndIndex.html" title="class in org.apache.poi.poifs.storage"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/poifs/storage/BATBlock.html" target="_top">FRAMES</a></li>
<li><a href="BATBlock.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li><a href="#nested_class_summary">NESTED</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li><a href="#field_detail">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
                <i>Copyright 2014 The Apache Software Foundation or
        its licensors, as applicable.</i>
            </small></p>
</body>
</html>
